
//Copyright 1997-2009 Syrinx Development, Inc.
//This file is part of the Syrinx Web Application Framework (SWAF).
// == BEGIN LICENSE ==
//
// Licensed under the terms of any of the following licenses at your
// choice:
//
//  - GNU General Public License Version 3 or later (the "GPL")
//    http://www.gnu.org/licenses/gpl.html
//
//  - GNU Lesser General Public License Version 3 or later (the "LGPL")
//    http://www.gnu.org/licenses/lgpl.html
//
//  - Mozilla Public License Version 1.1 or later (the "MPL")
//    http://www.mozilla.org/MPL/MPL-1.1.html
//
// == END LICENSE ==
using System;
using System.Xml;

using Swaf;

namespace Swaf.Workflow
{
	/// <summary>
	/// Thrown when a workflow engine encounters a problem processing a workflow script.
	/// A workflow engine should always throw this one exception only.  If the engine
	/// catches an exception while doing its job, it should still throw this exception
	/// and include the catched exception as the cause of this exception. 
	/// </summary>
	public class WorkflowException : BaseException 
	{
		/**
		 * Used when no other exception was caught by the workflow engine.
		 * @param msg The detailed reason for why this exception occured.
		 */
		public WorkflowException(String msg)
			:base(msg)
		{
		}

		/**
		 * Used when an exception was caught by the workflow engine and cannot be handled
		 * by it, thus causing this exception.  
		 * @param msg The detailed reason for why this exception occured.
		 * @param cause The caught exception that was the cause of this exception.
		 */
		public WorkflowException(String msg, System.Exception cause)
			:base(msg, cause)
		{
		}

		public WorkflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) 
			: base(info, context)
		{
		}
	}
}

